package com.googlecode.dgwt.client.dojo.data.model;

import com.googlecode.dgwt.client.dojo.Dojo;
import com.googlecode.dgwt.client.dojo.exception.AttachException;

/**
 * @author      Wellington Tadeu dos Santos
 * @since       DGWT v0.01
 */
public class ModelAttachException extends AttachException {

    private static final long serialVersionUID = 1L;

    
    public ModelAttachException(String msg) {
        super(msg);
    }

    public ModelAttachException(Class<?> targetClass, Class<?> strictClass) {
        super(Dojo.reflect.getSimpleName(targetClass) +
              " can only be used with " + 
              Dojo.reflect.getSimpleName(strictClass) + 
              " descendents");
    }

}
